import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';


@Injectable({
  providedIn: 'root'
})
export class QuickReplyDataService {
  //回复ID
  private replyIdSubject = new Subject<number>();

  /**
   * 快速回复底部抽屉Subject服务
   * 喜好操作记录Subject服务
   */
  constructor() { }

  /**
   * 订阅回复的ID
   */
  public query(): Observable<number> {
    return this.replyIdSubject.asObservable();
  }

  /**
   * 传递回复的ID
   * @param replyId 
   */
  public send(replyId: number): void {
    this.replyIdSubject.next(replyId);
  }
}